<?php

defined('PHPFOX') or exit('NO DICE!');

/**
 * 
 * Show store information in product detail page
 * @copyright		[PHPFOX_COPYRIGHT]
 * @author  		Anhbinu
 * @package 		Phpfox_Component
 * @version 		
 */
class Marketplace_Component_Block_Store_Edit extends Phpfox_Component
{
    public function process(){
        
        $iId = $this->getParam("id");
        
        if($aVals = $this->request()->get("val")){
            Phpfox::getService("marketplace.store.process")->update($iId,$aVals);
            return;
        }
        
        $aStore = Phpfox::getService("marketplace.store")->getForEdit($iId);
        $this->template()->assign(array(
            "aForms" => $aStore,
            "iListingId" => $this->getParam("iListingId")
        ));
    }
}